home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
utils2
/
sw_46.arj
/
SW46DEMO.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-11-07
|
6KB
|
221 lines
@ECHO OFF
if not %1!==! goto %1
: REM A pre-SW screen just for effect
: REM make sure the screen is default white on black
: REM reset border
sw /o
: REM save existing prompt
set sav=%prompt%
: REM make sure there was room in environment
if not %sav%!==%prompt%! goto skip
set prompt=$e[0m$p$g
@echo on
cls
@echo off
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Are Your Batch Files Dull?
echo.
echo Lifeless?
echo.
echo Boring?
echo.
echo SCREEN WIZARD is the answer!
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
pause
set prompt=%sav%
set sav=
:skip
: REM skip over beepdemo labels
: REM Put screen definitions in a separate file
goto begin
: REM labels for Alert sounds demos near the beginning of file
: REM for faster execution
:beep1
sw /a1
goto BeepDemo
:beep2
sw /a2
goto BeepDemo
:beep3
sw /a3
goto BeepDemo
:beep4
sw /a4
goto BeepDemo
:beep5
sw /a5
goto BeepDemo
:beep6
sw /a6
goto BeepDemo
:beep7
sw /a7
goto BeepDemo
:beep8
sw /a8
goto BeepDemo
:beep9
sw /a9
goto beepdemo
:beep10
sw @sw46demo charge
goto beepdemo
:beep11
sw @sw46demo close
goto beepdemo
:beep12
sw @sw46demo Fifth
goto beepdemo
:beep13
sw @sw46demo WZLX
goto beepdemo
:beep14
sw /a110-3520,12
goto beepdemo
:beep15
sw /a3520-110,6
goto beepdemo
: REM Alternate errorlevel check using FOR loop
:beepdemo
: REM Query is handled in a separate screen def so that I won't waste time
: REM redrawing the menu after each sound.
sw @sw46demo Snd_Query
: REM Errorlevels checked by FOR IN DO loop makes for a short line but
: REM slower processing
for %%e in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) do if errorlevel %%e goto beep%%e
if not errorlevel 1 goto DI
goto beepdemo
: REM Command line examples, positioning, colors, shadows, pause, Wide edge
: REM Color numbers are used to shorten the line
: REM Command line cannot exceed 128 characters
:begin
sw /r125 /c180 /z /l0 " " /bwhi
sw /kwhi[_] /kred /r2 /s /bred "SCREEN WIZARD - Enhance Your Batch Files!" /0 /w /m " v 4.6 " /o /z
sw /r10 /l1 /bcya /fRED "In it's simplest form, SW displays your text" "in a window in the center of the screen."
sw /r18 /l3 /t11 "Display up to 50 lines" /t14 "- each with its own color -" /t12 "in one window!" /0
sw /r25 /l0 /0 " - Press any key to continue - " /p100-
: REM More command line examples, justify, borders
sw /kcya░ /r2 /s /bred "SCREEN WIZARD - Add Color to Your BAT's!" /tYEL "So easy to use!" /w /0 /m " v 4.6 " /z
sw /fbla /byel /l4 /r10 "Other parameters allow different window colors," "double spacing, and 5 different borders" /2
sw /b7 /r19 /g4 /l "Clear the screen with color" "using an optional character for fill" "& make windows with shadows." /0 /s
sw /bwhi /r19 /gyel /l0 /0 /c4 /jl " Justify " " Text" " Left"
sw /bwhi /r19 /gyel /l0 /0 /c68 /jr " Justify " "Text " "Right "
sw /r25 /l0 /0 " - Press any key to continue - " /p100-
set colr=bla
: REM Make sure there was room in the environment
if not "%colr%"=="bla" goto next
: REM Another command line example, Query with default, Border Message, Draw
: REM Draw a full screen window
sw /r125 /c180 /o1 " "
sw /r3 /s /bred "SCREEN WIZARD - Flow Control for BAT's!" /w /0 /m " v 4.6 " /z
: REM The following line is longer than 128 characters BUT it works because
: REM when the line is processed by DOS, the %colr% variable is replaced by
: REM the color value making the command line 3 characters shorter.
:colors
sw /e12 /r13 /b%colr% /s /m /t14 "▌ Pick a Color ▐" "~Brown ~Cyan ~White ~Green" "Press {ESC} to go on..." /q~bcwg /2 /l5 /d
if errorlevel 4 set colr=gre
if errorlevel 4 goto colors
if errorlevel 3 set colr=whi
if errorlevel 3 goto colors
if errorlevel 2 set colr=cya
if errorlevel 2 goto colors
if errorlevel 1 set colr=yel
if errorlevel 1 goto colors
:next
set colr=
: REM Display screen definition with default label
sw @sw46demo
: REM Display screen definition in external file
sw @sw-46.new
: REM Display screen definition with label 'Snd_menu'
sw @sw46demo Snd_menu
: REM Query is handled separately beacause I wanted to return to the menu
: REM after processing the response without redoing the screen.
: REM I also placed it nearer the top of the file to speed it up.
goto beepdemo
: REM create screen definition on the fly to demo DI.EXE
:DI
if exist di.hlp goto DI_Display
sw /r15 /l1 /0 /s /bwhi /fBLU /gblu "Standby!" "Building Next Screen"
echo : REM This file was created by SW46DEMO.BAT > di.hlp
echo : REM If simply viewing this file, Try the following command at the DOS prompt >> di.hlp
echo : REM "SW @DI.HLP" >> di.hlp
echo.>> di.hlp
echo :Display >> di.hlp
echo _window /kmag▒─┼─▒ /s /bred /r2 /0 /w >> di.hlp
echo SCREEN WIZARD - Now with DI!>> di.hlp
echo /mc v 4.6 >> di.hlp
echo _window /jl /s /0 /r9 >> di.hlp
echo /mc Disk Information >> di.hlp
echo.>> di.hlp
di >> di.hlp
echo. >> di.hlp
echo /m /eYEL "~╡ Press any key to continue ~╞">> di.hlp
echo _window /r25 /bblu /l0 /0 /p300- >> di.hlp
echo :End_Display >> di.hlp
:DI_Display
sw @di.hlp
: REM Display screen definition with label '4.6'
:final
sw @sw46demo 4.6
for %%t in (10 9 8 7 6 5 4 3 2 1) do sw /r25 /l0 /0 /a10000,1 /p8- " - Pausing %%t seconds - " /@-
sw /r25 /l0 /0 /a60,1 /p2 " - Outta Here! - "
if exist sw-big.sw sw @sw-big
: REM display help screen
:help
sw